<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <!--{include file='comm/header.tpl'}-->
    <title>后台工具</title>
    <!--{include file="comm/icheck.tpl"}-->
    <!--引用div做成的下拉框效果样式-->
    <link rel="stylesheet" href="/quanliadmin/docroot/css/department_select.css" type="text/css" media="screen" />
    <!--引用div做成的下拉框效果js-->
    <script language="JavaScript" src="/quanliadmin/docroot/js/department_select.js" type="text/javascript"></script>
</head>
<body>

<style>
    .imageSites{
        position: absolute;
        left:740px;
        top:16px;
    }
    .imageSite{
        position: absolute;
        left:280px;
        top:8px;
    }
</style>

<div class="container">

    
        <div class="comm_content">

            <div class="search-box">
                <div style="position:relative">
                    <form class="form-inline" onsubmit="return false;" id="bill_form">
                        <div style="color:red;font-size: large;">订单业务区</div>
                        <table>
                            <tbody>
                            <tr>
                                <td style="height: 30px;">
                                    <span>订单号(bill_code)：<input type="text" class="form-control input-sm" style="width:148px" value="" name="bill_code" id="bill_code"></span>
                                </td>
                            </tr>
                            <tr>
                                <td style="height: 30px;">
                                    <span>订单状态更新至：
                                        <select class="form-control input-sm" name="bill_status" id="bill_status">
                                            <option value="">请选择</option>
                                            <!--{foreach from=$bill_status item=status_name key=status}-->
                                            <option value="<!--{$status}-->"><!--{$status_name}--></option>
                                            <!--{/foreach}-->
                                        </select>
                                    </span>
                                </td>
                                <td style="height: 30px;">
                                    <span><input type="button" onclick="bill.update_status_check();" class="btn btn-primary" value="订单状态更新"></span>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </form>
                </div>
            </div>

        </div>
    
</div>
<!--HTML OPEN-->
<div style="display:none">
    //区域添加
    <div id="pop" style="display:none">
        <div id="select-content">
            <form id="userForm" class="form-horizontal" role="form" onsubmit="return false;">
                <input type="hidden" id="uuid" name="uuid" value="" />
                <div id="add_user">
                    <div class="form-group">
                        <label for="config_code" class="col-sm-3 control-label"><span style="color:red;">*</span>&nbsp;config_code：</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" value="system" id="config_code" name="config_code" disabled="disabled" placeholder="请输入config_code" style="width: 350px"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="config_key" class="col-sm-3 control-label"><span style="color:red;">*</span>&nbsp;config_key：</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" value="" id="config_key" name="config_key" placeholder="请输入config_key" style="width: 350px"/>
                        </div>
                    </div>

                </div>

            </form>
        </div>
    </div>
</div>

<!--END HTML OPEN-->
<script type="text/javascript">
    var url = '/invokingAjax-backend/system/billTools.ajax';
    var bill = {

        check : function(){
            if($('#bill_code').val() == '') {
                E.alert('请输入订单号！');
                return false;
            }

            return true;

        },
        update_status_check : function(){
            if(!bill.check())
                return;
            if($('#bill_status').val() == ''){
                E.alert('请选择订单状态！');
                return false;
            }
            E.confirm("您确认要更新订单:" + $('#bill_code').val() + " 状态到["+ $('#bill_status').find("option:selected").text() +"]？", "bill.update_status");
        },
        update_status : function() {
            E.ajax_post({
                url: url,
                data: {
                    operFlg:1,
                    bill_code:$('#bill_code').val(),
                    bill_status:$('#bill_status').val()
                },
                call: "result"
            });
        }

    };

    function  result (o){
        if(o.code ==200)
            E.alert(o.message,2);
        else
            E.alert(o.message);
    }

    /*   var tools = {



        //清除
        clear: function(){
            $("#roleGroupID").val(0);
            $("#config_id").val("");
            $("#roleID").html(0);
            $("#trueName").val('');
        },

        //编辑
        edit: function(config_id) {
            this.config_id = config_id;
            this.operFlg = 1;
            if(config_id){
                var url = '/invokingAjax-backend/system/activity.ajax?operFlg=2&config_id='+config_id;
            }else{
                var url =  '/invokingAjax-backend/system/activity.ajax?operFlg=2';
            }
            E.loadding.open('正在操作，请稍候...');
            E.ajax_post({
                url: url,
                //data: {},
                call: "config.open"
            });
        },

        open: function(o){

            E.loadding.close();

            var title = "配置修改";

            if(o.code == 404){
                title = "配置添加";
                this.addBox = 'add_user';
            }
            E.popup.open({
                id:"pop",   		 //获取id为"pop"元素内的HTML
                title: title,       //弹出层标题
                css: "width:800px;",     //设置弹出层样式
                btnName: "保存",         //执行“确定”操作的按钮名称
                btnCall:"config.check();"  //点击确定后执行的方法
            });
            $('.square-radio').iCheck({
                checkboxClass: 'icheckbox_square-blue',
                radioClass: 'iradio_square-blue',
                increaseArea: '20%' // optional
            });

            if(config.operFlg == 2){
                $(".nav-tabs li:eq(1)").addClass("active");
                $(".nav-tabs li:eq(1)").siblings().removeClass("active");
                $("#add_user").addClass("hidden");
                $("#add_role").removeClass("hidden");
            }else{
                $(".nav-tabs li:eq(0)").addClass("active");
                $(".nav-tabs li:eq(0)").siblings().removeClass("active");
                $("#add_user").removeClass("hidden");
                $("#add_role").addClass("hidden");
            }

            if(o.code == 200){

                $('#uuid').val(o.data.uuid);
                $('#config_code').val(o.data.config_code);
                $('#config_key').val(o.data.config_key);
                $('#config_value').val(o.data.config_value);
                $('#config_remark').val(o.data.config_remark);

            }

        },

        check: function(){
            this.dt = E.getFormValues("userForm");
            var msg = '';

            if (E.isEmpty(this.dt.config_code)) {
                msg += "config_code不能为空<br>";
            }

            if (E.isEmpty(this.dt.config_key)) {
                msg += "config_key不能为空<br>";
            }

            if (E.isEmpty(this.dt.config_value)) {
                msg += "config_value不能为空<br>";
            }

            if (E.isEmpty(this.dt.config_remark)) {
                msg += "config_remark不能为空<br>";
            }

            if (msg != "") {
                E.alert(msg);
            } else {
                E.confirm("您确认要保存配置信息吗？", "config.save");
            }
        },
        save: function() {

            E.popup.close();

            E.loadding.open("正在保存配置信息，请稍候...");
            E.ajax_post({
                url: "/invokingAjax-backend/system/activity.ajax?operFlg=100&act=edit&config_id="+config_id,
                data: this.dt,
                call: "config.result"
            })
        },
        result: function( o ) {

            if (o.code == 200) {
                E.alert(o.message, 2, "config.load");
            } else {
                E.alert(o.message);
            }
            E.loadding.close();
        },


        load: function(){
            $("#flex").flexReload();
        },

        //角色分配
        role: function( config_id ) {
            this.config_id = config_id;
            this.operFlg = 2;
            var url = '/invokingAjax-backend/system/activity.ajax?operFlg=2&config_id='+config_id;
            E.loadding.open('正在操作，请稍候...');
            E.ajax_post({
                url: url,
                //data: {},
                call: "config.open"
            });
        },

        change: {

            config_id: "",
            useFlg: "",

            test:function(){
                alert()
            },

            confirm: function(config_id, useFlg) {
                this.config_id = config_id;
                this.useFlg = useFlg;
                if (useFlg == 0) {
                    E.confirm("您确认要禁用该配置吗？", "config.change.execute");
                } else {
                    E.confirm("您确认要启用该配置吗？", "config.change.execute");
                }
            },

            execute: function() {
                if (this.useFlg == 0) {
                    E.loadding.open("正在禁用配置，请稍候...");
                } else {
                    E.loadding.open("正在启用配置，请稍候...");
                }
                E.ajax_post({
                    url: "/invokingAjax-backend/system/activity.ajax?operFlg=100&act=change",
                    data: {
                        config_id: this.config_id,
                        useFlg: this.useFlg
                    },
                    call: "config.change.result"
                });
            },

            result: function( o ) {
                E.loadding.close();
                if (o.code == 200) {
                    config.load();
                    E.alert(o.message, 2);
                } else {
                    E.alert(o.message);
                }
            }

        },

        del: {

            u_array: "",

            check: function() {

                //获取选中的行的行数
                if ($('.trSelected',flex).length == 0) {

                    E.alert('请选择要删除的配置');

                } else {

                    this.u_array = new Array();

                    $.each($('.trSelected',flex), function(k, v) {
                        config.del.u_array.push($(v).attr("id").substr(3));
                    });

                    //弹出确认层
                    E.confirm("您确认要删除吗？", "config.del.execute");

                }

            },

            execute: function() {

                E.loadding.open("正在删除配置，请稍候...");
                E.ajax_post({
                    url: "/invokingAjax-backend/system/activity.ajax?operFlg=100&act=del",
                    data: {
                        ids: this.u_array
                    },
                    call: "config.del.result"
                });

            },

            result: function( o ) {
                E.loadding.close();
                if (o.code == 200) {
                    config.load();
                    E.alert(o.message, 2);
                } else {
                    E.alert(o.message);
                }
            }

        },
        changed: function(ythis,boxID){

            this.addBox = boxID;

            $(ythis).addClass('active').siblings().removeClass('active');

            $('#'+boxID.toString()).removeClass('hidden').siblings().addClass('hidden');

        }

    };
*/

</script>

</body>

</html>